﻿<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
	<title>啦啦啦</title>

	<!-- Bootstrap -->
	<link href="/static/css/bootstrap.min.css" rel="stylesheet">
	<link rel="stylesheet" type="text/css" href="/static/css/index.css">

	<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
	<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
      <![endif]-->
  </head>
  <body>

  	<!-- 技术日记 -->
  	<div class="container div_divider">
  		<!-- 分割线 -->
  		<hr class="hr_1">
        <a href="{{ word.0.Body.url }}">
            <p>{{ word.0.Body.word }} --- {{ word.0.Body.word_from }}</p>
        </a>
      <hr class="hr_2">
  		<div class="row">
  			<!-- 文章列表 -->
  			<div class="col-xs-9">
  				<div class="list-group div_article">
  					<!-- 子头栏 -->
  					<a href="#" class="list-group-item active item_article_first">
  						<h4 class="list-group-item-heading">
  							最近心情：{{ feeling.title }}
  						</h4>
  					</a>

                    {% block detail %}
                    {% endblock %}

                    {% block index %}
                    {% endblock %}

                    {% block feelings %}
                    {% endblock %}

                </div>
            </div>
  			<!-- 右侧 -->
  			<div class="col-xs-3 div_record">
  				<!-- 用户信息 -->
  				<div class="jumbotron div_userinfo">
  					<img class="iv_user_head img-circle" src="/media/flyingdigital.png">
  					<div style="display: inline-block; margin-left: 12px;font-size: 18px;">FlyingDigital</div>
  				</div>
  				<!-- 随手记录 -->
  				<div style="display: flex;">
  					<div style="flex: 1"><hr></div>
  					<div style="text-align: center;line-height: 48px;color: #34374C">记录美好的心情</div>
  					<div style="flex: 1"><hr></div>
  				</div>
				<form>
  				<input type="text" class="form-control" placeholder="标题:美好的一天..." id='title'>
  				<br>
  				<textarea class="form-control" rows="3" name=textarea placeholder="内容:今天捡到一分钱！！！^_^" id="textarea"></textarea>
  				<br>
  				<div class="div_save">
  					<button type="button" class="btn btn-primary btn_save_record" id="save">save</button>
  				</div>
  				<hr>
				</form>
            </div>
        </div>
  	</div>





  	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  	<script src="/static/js/jquery-3.3.1.min.js"></script>
  	<!-- Include all compiled plugins (below), or include individual files as needed -->
  	<script src="/static/js/bootstrap.min.js"></script>
  	<script src="/static/js/init.js" type="text/script"></script>
  	<script src="/static/js/util.js"></script>


{#增加#}
<script type="text/javascript" charset="UTF-8">
    $('#save').click(function () {
        $.ajax({
            type:'POST',
            url:'/api_save/',
            dataType:'json',
            data:{
                title:$('#title').val(),
                textarea:$('#textarea').val(),
            },
            success:function (back) {
                alert(back.status)
            },
            error:function (Code) {
                alert('Code:' + Code.status)
            }
        });
    });
</script>
  </body>
  </html>